package com.example.demo.service;

import com.example.demo.dao.UserMapper;
import com.example.demo.model.UserInfo;
import com.example.demo.model.vo.UserInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: wenjingyuan
 * @Date: 2023/08/01/10:39
 * @Description:
 */
@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public int reg(UserInfo userInfo){
        return userMapper.reg(userInfo);
    }

    public UserInfo getUserByName(String username){
        return userMapper.getUserByName(username);
    }

    public List<String> getUsername(){
        return userMapper.getUsername();
    }

    public UserInfoVO getUserDetail(int uid){
        return userMapper.getUserDetail(uid);
    }
}
